home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / include / linux / elfcore.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-09-09  |  2.8 KB  |  96 lines

  1. #ifndef _LINUX_ELFCORE_H
  2. #define _LINUX_ELFCORE_H
  3.  
  4. #include <linux/types.h>
  5. #include <linux/signal.h>
  6. #include <linux/time.h>
  7. #include <linux/ptrace.h>
  8.  
  9. struct elf_siginfo
  10. {
  11.     int    si_signo;            /* signal number */
  12.     int    si_code;            /* extra code */
  13.     int    si_errno;            /* errno */
  14. };
  15.  
  16.  
  17. typedef elf_greg_t greg_t;
  18. typedef elf_gregset_t gregset_t;
  19. typedef elf_fpregset_t fpregset_t;
  20. typedef elf_fpxregset_t fpxregset_t;
  21. #define NGREG ELF_NGREG
  22.  
  23. /*
  24.  * Definitions to generate Intel SVR4-like core files.
  25.  * These mostly have the same names as the SVR4 types with "elf_"
  26.  * tacked on the front to prevent clashes with linux definitions,
  27.  * and the typedef forms have been avoided.  This is mostly like
  28.  * the SVR4 structure, but more Linuxy, with things that Linux does
  29.  * not support and which gdb doesn't really use excluded.
  30.  * Fields present but not used are marked with "XXX".
  31.  */
  32. struct elf_prstatus
  33. {
  34. #if 0
  35.     long    pr_flags;    /* XXX Process flags */
  36.     short    pr_why;        /* XXX Reason for process halt */
  37.     short    pr_what;    /* XXX More detailed reason */
  38. #endif
  39.     struct elf_siginfo pr_info;    /* Info associated with signal */
  40.     short    pr_cursig;        /* Current signal */
  41.     unsigned long pr_sigpend;    /* Set of pending signals */
  42.     unsigned long pr_sighold;    /* Set of held signals */
  43. #if 0
  44.     struct sigaltstack pr_altstack;    /* Alternate stack info */
  45.     struct sigaction pr_action;    /* Signal action for current sig */
  46. #endif
  47.     pid_t    pr_pid;
  48.     pid_t    pr_ppid;
  49.     pid_t    pr_pgrp;
  50.     pid_t    pr_sid;
  51.     struct timeval pr_utime;    /* User time */
  52.     struct timeval pr_stime;    /* System time */
  53.     struct timeval pr_cutime;    /* Cumulative user time */
  54.     struct timeval pr_cstime;    /* Cumulative system time */
  55. #if 0
  56.     long    pr_instr;        /* Current instruction */
  57. #endif
  58.     elf_gregset_t pr_reg;    /* GP registers */
  59. #ifdef CONFIG_BINFMT_ELF_FDPIC
  60.     /* When using FDPIC, the loadmap addresses need to be communicated
  61.      * to GDB in order for GDB to do the necessary relocations.  The
  62.      * fields (below) used to communicate this information are placed
  63.      * immediately after ``pr_reg'', so that the loadmap addresses may
  64.      * be viewed as part of the register set if so desired.
  65.      */
  66.     unsigned long pr_exec_fdpic_loadmap;
  67.     unsigned long pr_interp_fdpic_loadmap;
  68. #endif
  69.     int pr_fpvalid;        /* True if math co-processor being used.  */
  70. };
  71.  
  72. #define ELF_PRARGSZ    (80)    /* Number of chars for args */
  73.  
  74. struct elf_prpsinfo
  75. {
  76.     char    pr_state;    /* numeric process state */
  77.     char    pr_sname;    /* char for pr_state */
  78.     char    pr_zomb;    /* zombie */
  79.     char    pr_nice;    /* nice val */
  80.     unsigned long pr_flag;    /* flags */
  81.     __kernel_uid_t    pr_uid;
  82.     __kernel_gid_t    pr_gid;
  83.     pid_t    pr_pid, pr_ppid, pr_pgrp, pr_sid;
  84.     /* Lots missing */
  85.     char    pr_fname[16];    /* filename of executable */
  86.     char    pr_psargs[ELF_PRARGSZ];    /* initial part of arg list */
  87. };
  88.  
  89. typedef struct elf_prstatus prstatus_t;
  90. typedef struct elf_prpsinfo prpsinfo_t;
  91. #define PRARGSZ ELF_PRARGSZ 
  92.  
  93.  
  94.  
  95. #endif /* _LINUX_ELFCORE_H */
  96.